Object.defineProperty(exports, "__esModule", {
  value: true
});
var cc__decorator = cc._decorator;
var ccp_ccclass = cc__decorator.ccclass;
var ccp_property = cc__decorator.property;
var def_Num2 = function (e) {
  function _ctor() {
    var t = null !== e && e.apply(this, arguments) || this;
    t.label = null;
    t.type = 0;
    t.owner = null;
    return t;
  }
  __extends(_ctor, e);
  _ctor.prototype.initAsHp = function (e) {
    this.type = 0;
    this.owner = e;
    this.changeHpTo();
    this.updateAsHp();
  };
  _ctor.prototype.updateAsHp = function () {
    this.node.setPosition(this.owner.node.position.x, this.owner.node.position.y + this.owner.hpY);
  };
  _ctor.prototype.changeHpTo = function () {
    this.label.string = "" + this.owner.hp;
  };
  _ctor.prototype.init = function () {};
  _ctor.prototype.start = function () {};
  _ctor.prototype.update = function () {
    0 === this.type && this.updateAsHp();
  };
  __decorate([ccp_property(cc.Label)], _ctor.prototype, "label", undefined);
  return __decorate([ccp_ccclass], _ctor);
}(cc.Component);
exports.default = def_Num2;